package com.zhijian.warehouse.manage.dao;

import com.zhijian.warehouse.manage.entity.export.StoreOptDetRecordExport;
import com.zhijian.warehouse.manage.entity.export.StoreOptRecordExport;
import com.zhijian.warehouse.manage.entity.po.StoreOptRecord;
import com.zhijian.warehouse.manage.entity.vo.request.StoreOptRecordSearchVo;
import com.zhijian.warehouse.manage.entity.vo.response.StoreOptRecordVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StoreOptRecordMapper {
    int deleteByPrimaryKey(Long id);
    
    int insert(StoreOptRecord record);
    
    int insertSelective(StoreOptRecord record);
    
    StoreOptRecord selectByPrimaryKey(Long id);
    
    int updateByPrimaryKeySelective(StoreOptRecord record);
    
    int updateByPrimaryKey(StoreOptRecord record);
    
    /**
     * 查询总数
     *
     * @param storeOptRecordSearchVo
     * @return
     */
    int count(StoreOptRecordSearchVo storeOptRecordSearchVo);
    
    /**
     * 查询列表
     *
     * @param storeOptRecordSearchVo
     * @return
     */
    List<StoreOptRecordVo> selectList(StoreOptRecordSearchVo storeOptRecordSearchVo);
    
    /**
     * 查询单个
     *
     * @param storeOptRecordSearchVo
     * @return
     */
    StoreOptRecordVo selectOne(StoreOptRecordSearchVo storeOptRecordSearchVo);
    
    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    StoreOptRecordVo selectVoById(Long id);
    
    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);
    
    /**
     * 动态删除
     *
     * @param storeOptRecordSearchVo
     * @return
     */
    void deleteByCondition(StoreOptRecordSearchVo storeOptRecordSearchVo);
    
    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<StoreOptRecord> entities);
    
    /**
     * 根据OptId查询列表
     *
     * @param optId
     * @return
     */
    List<StoreOptRecordVo> selectListByOptId(Long optId);
    
    /**
     * 根据OptUserId查询列表
     *
     * @param optUserId
     * @return
     */
    List<StoreOptRecordVo> selectListByOptUserId(Long optUserId);
    
    /**
     * 根据StoreId查询列表
     *
     * @param param
     * @return
     */
    List<StoreOptRecordExport> selectStoreOptExportList(StoreOptRecordSearchVo param);
    
    /**
     * @param param
     * @return
     */
    List<StoreOptDetRecordExport> storeOptDetailExport(StoreOptRecordSearchVo param);
}
